package cn.oa.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.oa.bean.Account;
import cn.oa.bean.Register;
import cn.oa.mapper.AccountMapper;
import cn.oa.service.AccountService;

@Service
public class AccountServicelmpl implements AccountService {
	@Resource
	private AccountMapper accountmapper;

	@Override
	public Account login(Account account) {
		return accountmapper.login(account);
	}

	@Override
	public Boolean register(Register register) {
		accountmapper.register(register);
		Integer id = register.getId();
		accountmapper.register1(register);
		return accountmapper.register2(register);
	}

}
